package cool.tsy.emos.wx.db.pojo;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

import java.io.Serializable;
import java.util.Date;

/**
 * @author: hongxuan.wang
 * @date: Created in 2021/11/30 19:15
 * @description: 消息集合（Mongodb）
 * @mail: 1443424326@qq.com
 */
@Data
@Document(collation = "message")
public class Message implements Serializable {

    private static final long serialVersionUID = -1552036104777658858L;

    @Id
    private String _id;

    @Indexed(unique = true)
    private String uuid;

    @Indexed
    private Integer senderId;

    private String senderPhoto = "https://static-1258386385.cos.ap-beijing.myqcloud.com/img/System.jpg";

    private String senderName;

    private String msg;

    @Indexed
    private Date sendTime;
}
